#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/12/28 9:46
# @Author: 周阳
# @Email: 100530987@qq.com
# @File：haowusociety_page.py
from selenium.webdriver.common.by import By

class HaoWuSocietyPage:
    def __init__(self,driver):
        self.driver = driver

    search_btn_locator = (By.XPATH,'//android.widget.LinearLayout[@resource-id=\"com.gfeng.daydaycook:id/qmuill_search\"]')
    shoppingcart_btn_locator=(By.ID,'com.gfeng.daydaycook:id/rl_cart')
    laofan_btn_locator=(By.XPATH,'//android.widget.TextView[@text=\"日日煮自热系列-鲍汁捞饭\"]')

    def click_btn_search(self):
        self.driver.find_element(*self.search_btn_locator).click()

    def click_btn_shoppingcart(self):
        self.driver.find_element(*self.shoppingcart_btn_locator).click()

    def click_btn_laofan(self):
        self.driver.find_element(*self.laofan_btn_locator).click()
